<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
include_once("../classeBDD/connectBdd.php");
$sql = sql::connect();
if(isset($_SESSION['user'])){
      $req = $sql->query("SELECT * FROM annonce where mail='".$_SESSION['user']."'");
}
else echo '<script language="Javascript">document.location.replace("./index.php?page_id=Connexion&modifier=ok");</script>';


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<title>Jquery Inline Form Validation Engine</title>
		<link rel="stylesheet" href="/css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="utf-8" />
		<link rel="stylesheet" href="/css/template.css" type="text/css" media="screen" title="no title" charset="utf-8" />
		<script src="/jquery/jquery.min.js" type="text/javascript"></script>
                <script  type="text/javascript" src="/jquery/verif_pwd.js"></script>
		<script src="/jquery/jquery.validationEngine-en.js" type="text/javascript"></script>
		<script src="/jquery/jquery.validationEngine.js" type="text/javascript"></script>

		<!-- AJAX SUCCESS TEST FONCTION	
			<script>function callSuccessFunction(){alert("success executed")}
					function callFailFunction(){alert("fail executed")}
			</script>
		-->
		
		
<title>Document sans titre</title>
</head>
<body>
    <?php while($resultat = $sql->fetch_array($req)) 
	{ ?>
     <ul  style="border-bottom:1px solid gray;">
          <?php //$requery_image=$sql->query('SELECT img_largeur,img_hauteur,img_blob,img_type FROM images where 	id_annonce='.$resultat['IdAnonce']);?>
          <?php echo $resultat['ttitre_annonce'];?><br/>
        <a href="./lister_client.php?id_annonce=<?php echo $resultat['IdAnonce'];?>"><img src="<?php echo $resultat['images'];?>" border="0" align="center" width="40%" height=30%/></a><br/>
          <?php echo $resultat['text_annonce'] ?><br/>
          <?php echo $resultat['prix'] ?> Ouguiya<br/>
            <a href="./index.php?page_id=Formulaire_modif&id_annonce=<?php echo $resultat['IdAnonce'];?>">Modifier l'annonce</a><br/>
                    
     </ul>
    <?php }?>
</body>
</html>

<?php //include_once"../commune/pied.php";?>
      
        
            